<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button>xx</button>
  <script>
    let btn = document.querySelector('button')

    //宏任务回调
    btn.onclick = function(){

    }
    //宏任务回调
    setTimeout(() => {

    }, 1000);
    //宏任务回调
    xhr.onreadystatechange = function(){

    }

    //微任务回调
    let p = new Promise((resolve, reject) => {
      resolve('ok');
    })
    p.then(v => {

    });

  </script>

  <script>
    let a = 100;
    let b = 200;
    let c = a + b;

    setTimeout(() => {
      console.log('异步回调哦~~');
    }, 1000)

    function fn(){
      console.log('love')
    }
    fn();

  </script>

</body>
</html>